<template>
  <div style="padding: 16px">
    <div style="border: 1px solid #e5e7eb; padding: 20px; background-color: #fff">
      <el-descriptions :column="1" :border="true">
        <el-descriptions-item label="项目名称">{{ data.desData.projectId }}</el-descriptions-item>
        <el-descriptions-item label="预算周期">{{ data.desData.budgetPeriod }}</el-descriptions-item>
        <el-descriptions-item label="预算金额">{{ data.desData.budgetAmount }}</el-descriptions-item>
        <el-descriptions-item label="预算类型">{{ data.desData.budgetType }}</el-descriptions-item>
      </el-descriptions>
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { reactive } from 'vue';
  import { getbudget } from '/@/api/backs/workFlow/budget';
  import { propTypes } from '/@/utils/propTypes';
  import { useRoute } from 'vue-router';
  const props = defineProps({
    id: propTypes.number.def(undefined),
  });
  const data = reactive({
    desData: {},
  });
  const { params } = useRoute();
  getbudget({ id: props.id || params.id }).then((res) => {
    data.desData = res;
  });
</script>
